<template>
  <div class="backView">

    <div class="itemView" v-for="item in dataList">
      <img :src="item.pic" class="coverPic"/>
      <div style="padding-top: 8px;flex-grow: 1">
        <span class="title">{{item.title}}</span>
        <div class="tipsContainer">
          <span class="tips flag">{{item.flag}}新客接待</span>
          <span style="color: #E4E8EC">|</span>
          <span class="tips timeLength">{{item.timeLength}}1分45秒</span>
          <span style="color: #E4E8EC">|</span>
          <span class="tips learnCount">{{item.learnCount}}200人已学习</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    props: ['dataList', 'courseDetail'],
    data() {
      return {
        data: '',
        courseId: this.$route.params.courseId,
      }
    },
    methods: {
      onItemClick(item) {
        //TODO 跳转
      }
    }
  }
</script>

<style scoped>
  .backView {
    padding: 16px;
  }

  .itemView {
    display: flex;
    width: 100%;
    margin-bottom: 16px;
  }

  .coverPic {
    width: 100px;
    height: 66px;
    object-fit: cover;
    margin-right: 12px;
    background-color: #009944;
  }

  .title {
    font-size: 16px;
    color: #4C4D50;
    font-weight: bold;
  }

  .tips {
    font-size: 14px;
  }

  .flag {
    color: #1DA1F2;
  }

  .timeLength {
    color: #1CA562;
  }

  .learnCount {
    color: #98999E;
  }

  .tipsContainer {
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
  }
</style>


